package com.lqfan.autoAnswerQ.model.fileType;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;

/**
 *
 * @author lqfan
 * @since 2020-04-04
 */
@TableName("fileType")
@Data
public class FileType extends Model<FileType> {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.UUID)
    private String id;

    /**
     * 文件保存路径
     */
    @TableField("filePath")
    private String filePath;

    /**
     * 用户id
     */
    @TableField("userId")
    private String userId;

    /**
     * 类型
     */
    @TableField("type")
    private Integer type;

    /**
     * 父id
     */
    @TableField("pid")
    private String pid;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "FileType{" +
        "id=" + id +
        ", filePath=" + filePath +
        ", userId=" + userId +
        ", type=" + type +
        "}";
    }
}
